package com.clp.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.clp.service.HelloService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class HelloController {

    @Reference
    private HelloService helloService;


    @RequestMapping("hello")
    @ResponseBody
    public String getName(String name) {
        String result = helloService.sayHello(name);
        System.out.println(result);
        return result;
    }
}
